package org.lds.ers.server.model;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

//代表一個支聯會物件
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Stake {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
    
    public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	private Long id;

    @Persistent
    private String stakeName; //支聯會名稱

    @Persistent
    private String stakeNo;	//支聯會代碼
    
    @Persistent
    private String remark;  

    @Persistent
    private Date lastUpdate;	//最後修改時間
    
    @Persistent
    private String byWhom;	//由誰修改
    
    
    public Stake(String stakeName, String stakeNo, String remark, Date lastUpdate, String byWhom) {
        this.stakeName = stakeName;
        this.stakeNo = stakeNo;
        this.remark = remark;
        this.lastUpdate = lastUpdate;
        this.byWhom = byWhom;
    }

    public Long getId() {
        return id;
    }
    
    public String getStakeName()
    {
    	return this.stakeName ;
    }
    
    public String getStakeNo()
    {
    	return this.stakeNo ;
    }
    
    public String getRemark()
    {
    	return this.remark ;
    }
    
    public Date getLastUpdate()
    {
    	return this.lastUpdate ;
    }
    
    public String getByWhom()
    {
    	return this.byWhom ;
    }
    
    public void setID(Long id)
    {
    	this.id = id ;
    }
    
    public void setStakeName(String stakeName)
    {
    	this.stakeName = stakeName ;
    }
    
    public void setStakeNo(String stakeNo)
    {
    	this.stakeNo = stakeNo;
    }
    
    public void setRemark(String remark)
    {
    	this.remark = remark;
    }
    
    public void setLastUpdate(Date lastUpdate)
    {
    	this.lastUpdate = lastUpdate ;
    }
    
    public void setByWhom(String byWhom)
    {
    	this.byWhom = byWhom;
    }
    
}
